interface FetchCouponDetailAPIResData {
  code: number
  msg: string
  time: string
  data: CouponDetail
}

interface FetchCouponDetailAPIParams {
  id: string
}

export function fetchCouponDetailAPI(params: FetchCouponDetailAPIParams, token: string) {
  return httpInstance.get<FetchCouponDetailAPIResData, FetchCouponDetailAPIParams>(
    '/api/coupon/usecoupon',
    { params, headers: { token } },
  )
}
